﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using S.PurchaseAndSales.Domain.Model;
using S.PurchaseAndSales.Domain.SqlServer;
using S.PurchaseAndSales.Infrastructure.Interface.SalesForm;

namespace S.PurchaseAndSales.Infrastructure.Impl.SalesForm
{
    public class SheepSaleRepository : BaseRepository<SheepSaleModel>, ISheepSaleRepository
    {
        public SheepSaleRepository(SqlDbContext db) : base(db)
        {
        }

        public async Task<bool> BatchUpdateMoneyState(List<SheepSaleModel> sheepSaleModels)
        {
             db.SheepSaleModels.UpdateRange(sheepSaleModels);
            return await db.SaveChangesAsync()>0;
        }
    }
}
